/* MDX渲染器容器样式 */
.mdx-renderer {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
.mdx-h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
  color: #1a1a1a;
  border-bottom: 3px solid #007acc;
  padding-bottom: 0.5rem;
}

.mdx-h2 {
  font-size: 2rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
  color: #2c3e50;
  border-bottom: 2px solid #e1e8ed;
  padding-bottom: 0.3rem;
}

.mdx-h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.25rem 0 0.75rem 0;
  color: #34495e;
}

.mdx-h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem 0;
  color: #34495e;
}

.mdx-h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.875rem 0 0.5rem 0;
  color: #34495e;
}

.mdx-h6 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.75rem 0 0.5rem 0;
  color: #34495e;
}

/* 段落样式 */
.mdx-paragraph {
  margin: 1rem 0;
  line-height: 1.7;
  color: #444;
}

/* 代码样式 */
.mdx-pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  line-height: 1.45;
}

.mdx-code {
  background: #f1f3f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  color: #d73a49;
}

.mdx-pre .mdx-code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* 列表样式 */
.mdx-ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.mdx-ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.mdx-li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.mdx-li::marker {
  color: #007acc;
}

/* 表格样式 */
.mdx-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.mdx-thead {
  background: #f8f9fa;
}

.mdx-th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border: 1px solid #dee2e6;
  color: #495057;
}

.mdx-td {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  color: #495057;
}

.mdx-tr:nth-child(even) {
  background: #f8f9fa;
}

/* 引用样式 */
.mdx-blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #007acc;
  background: #f8f9fa;
  font-style: italic;
  color: #555;
}

.mdx-blockquote p {
  margin: 0;
}

/* 链接样式 */
.mdx-link {
  color: #007acc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.mdx-link:hover {
  color: #005a9e;
  border-bottom-color: #005a9e;
}

/* 分割线样式 */
.mdx-hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, #007acc, #e1e8ed);
  margin: 2rem 0;
}

/* 强调样式 */
.mdx-strong {
  font-weight: 700;
  color: #1a1a1a;
}

.mdx-em {
  font-style: italic;
  color: #555;
}

/* 加载状态样式 */
.mdx-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #666;
}

.mdx-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007acc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误状态样式 */
.mdx-error {
  padding: 2rem;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 6px;
  color: #c53030;
}

.mdx-error h3 {
  margin: 0 0 1rem 0;
  color: #c53030;
}

.mdx-error pre {
  background: #fed7d7;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.875rem;
  white-space: pre-wrap;
}

/* 空状态样式 */
.mdx-empty {
  padding: 3rem;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .mdx-renderer {
    padding: 1rem;
    margin: 0 1rem;
  }
  
  .mdx-h1 {
    font-size: 2rem;
  }
  
  .mdx-h2 {
    font-size: 1.5rem;
  }
  
  .mdx-table {
    font-size: 0.8rem;
  }
  
  .mdx-th,
  .mdx-td {
    padding: 0.5rem;
  }
}